package main

import "fmt"

func add1(x, y int) (sum int) {
	sum = x + y
	return
}

func add2(x, y int) (sum int) {
	sum = x + y
	return 10
}

func swap(x, y int) (m int, n int) {
	m = y
	n = x
	return
}

func main() {
	z1 := add1(1, 2)
	fmt.Printf("z1 = %d\n", z1)
	z2 := add2(1, 2)
	fmt.Printf("z2 = %d\n", z2)

	x := 10
	y := 20
	fmt.Printf("x=%d, y=%d\n", x, y)
	x, y = swap(x, y)
	fmt.Printf("x=%d, y=%d\n", x, y)
}
